package iMaple.Packet;

/*
*          iMaple by KururuLABO
*/

import client.MapleClient;
import iMaple.iPacket;
import tools.data.LittleEndianAccessor;
import tools.packet.LoginPacket;

/**
 *
 * @author KururuLABO
 */
public class RequestPicHandler {

     public static final void RequestPic(LittleEndianAccessor slea, MapleClient c) {
         String pic = slea.readMapleAsciiString();
         if (pic.length() >= 6 && pic.length() <= 16) {
            c.setSecondPassword(pic);
            c.updateSecondPassword();
            c.getSession().write(iPacket.Self_Varification());
         } else {
            c.getSession().write(LoginPacket.secondPwError((byte) 0x14));
            return;
         }  
     }
}
